
#ifndef KPOWERBOX_SERVER
#define KPOWERBOX_SERVER

#include <QtCore/QList>
#include <QtCore/QObject>
#include <QtCore/QString>

#include <QtGui/QtGui>

#include "powerbox.h"


/**
 * A server which displays powerboxes on request
 */
class KPowerBoxServer : public QObject
{
	Q_OBJECT


	public:
	KPowerBoxServer();


	public slots:
	/**
	 * Shows a KDE-based PowerBox.
	 *
	 * This is a very long list of parameters, but we have to use Qt-friendly types
	 * in order for Qt to do the D-Bus marshalling and unmarshalling for us.
	 *
	 * @param   operation      what we're doing (see powerbox.h)
	 * @param   title          the title of the dialog box
	 * @param   parent         ID of the parent window (to pop up in front of)
	 * @param   startDir       where to look for files
	 * @param   filter         selection filter (e.g. "*.cpp")
	 * @param   allowMultipleSelections   allow multiple selection
	 *
	 * @return  a list of file names
	 */
	Q_SCRIPTABLE QStringList showPowerbox(
		int operation,
		QString title,
		QString parent,
		QString startDir,
		QString filter,
		bool allowMultipleSelections = false);
};

#endif

